import { defineStore } from 'pinia';

export const useUIStore = defineStore('ui', {
  state: () => ({
    // 侧边栏状态
    sidebarOpen: false
  }),

  actions: {
    // 切换侧边栏
    toggleSidebar() {
      this.sidebarOpen = !this.sidebarOpen;
    },

    // 关闭侧边栏
    closeSidebar() {
      this.sidebarOpen = false;
    }
  }
});
